package com.zw.demo01.mapper;

import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: DynamicSqlMapper
 * @Description TODO
 * @Author: zzw
 * @Date: 2023/3/28 14:47
 * @Version 1.0.0
 */
@Mapper
public interface DynamicSqlMapper {

    @Select({"${sql}"})
    @ResultType(Object.class)
    List<Map<String, Object>> dynamicsSelect(@Param("sql") String sql);

    @Insert({"${sql}"})
    @ResultType(Integer.class)
    Integer dynamicsInsert(@Param("sql") String sql);

    @Update({"${sql}"})
    @ResultType(Integer.class)
    Integer dynamicsUpdate(@Param("sql") String sql);

    @Delete({"${sql}"})
    @ResultType(Integer.class)
    Integer dynamicsDelete(@Param("sql") String sql);

}
